<div class="toolbar">


<div class="fliterbox" >




    <?

    foreach ($_REQUEST as $key=>$value){

        //排除这两个key set PHPSESSID
        if($key != "PHPSESSID" and $key != "set" and $key !='sort'){
            ?>

<?

            // 解析 URL 参数
            parse_str($url_parameter, $params);

// 移除匹配的参数
            if (isset($params[$key]) && urldecode($params[$key]) === $value) {
                unset($params[$key]);
            }

// 重新构建 URL


                if($key != 'asset_class' &&  $value != ''){
                    $_cuted_url_parameter = http_build_query($params);

                    if($key == 'duration'){
                        if($value == 0){
                            $value = 'All';
                        }
                        elseif($value == 1){
                            $value = 'Short (&lt;5min)';
                        }
                        elseif($value == 2){
                            $value = 'Medium (5-20min)';
                        }
                        elseif($value == 3){
                            $value = 'Long (&gt;20min)';
                        }
                    }
?>
    <a href="asset_list.php?<?echo $_cuted_url_parameter?>" class="tag type">
        <i class="fa fa-filter"></i>
        <?
        if($key=="brand")
        {echo $brand_name_list[$value];}
        elseif($key=="like_product_category")
        {echo $category_name_list[$value];}
        elseif($key=="like_product")
        {echo $product_name_list[$value];}
        else{echo $value;}?>
        <span><i class="fa fa-times-circle close"></i></span>
    </a>
                <?;}
                else{
                    foreach ($value as $key2=>$value2){

                        $asset_class_arr = $assetclass_arr2 = $value;

                        foreach($asset_class_arr as $key3=>$value3){
                            if($value3 == $value2){
                                unset($asset_class_arr[$key3]);
                            }
                            $params['asset_class'] = $asset_class_arr;
                            $_cuted_url_parameter = http_build_query($params);
                        }
                ?>
                        <a href="asset_list.php?<?echo $_cuted_url_parameter?>" class="tag type">
                            <i class="fa fa-filter"></i>
                            <? echo $value2;?>
                            <span><i class="fa fa-times-circle close"></i></span>
                        </a>
        <?;

                    }
                }
            }?>
        <?;}?>



    <a href="asset_list.php" class="tags action-btn">
        <i class="fa fa-times-circle"></i>
        Clear filters
    </a>
</div>












<div id="media-container" class="content-container media  ui-selectable" >


    <div id="assetsDragSelectArea" class="Container-sc-tqwrxn-0 bsJhLR" style="padding-top: 55px !important;padding-left: 25px">
        <div class="media-tools clearfix">





<ul class="media-tools-left clearfix">
    <li class="media-results selected">

                        <span class="StyledTotalSpan-sc-156b3z1-1 flMYMc results">
                            <strong>
                                <?echo $quantity?>
                            </strong>
                            Results
                        </span>
    </li>
    <li class="media-sort">
        <a class="sort" tabindex="-1" href="#">
            Order by
            <strong>
                Date added
            </strong>
            <i class="fa fa-caret-down">
            </i>
        </a>
        <ul class="auto-complete">
            <li class="active">
                <a href="#" data-type="orderBy" data-default="true" data-value="dateCreated">
                    Order by
                    <strong>
                        Date added
                    </strong>
                </a>
            </li>
            <li class="">
                <a href="#" data-type="orderBy" data-default="false" data-value="datePublished">
                    Order by
                    <strong>
                        Date published
                    </strong>
                </a>
            </li>
            <li class="">
                <a href="#" data-type="orderBy" data-default="false" data-value="dateModified">
                    Order by
                    <strong>
                        Date modified
                    </strong>
                </a>
            </li>

        </ul>
    </li>
    <li class="media-sort sort-order">
        <a href="#" title="Sort ascending" class="sort loading">
            <i class="fa fa-fw fa-sort-amount-desc">
            </i>
        </a>
    </li>

















    <ul class="actions-bar group-btns">

        <li class="<? if($_REQUEST['sort'] == 'grid'){ echo 'active';}?> ">
            <a class="group-btn tip-trigger" href="asset_list.php?<? echo $url_parameter.'&sort=grid';?>" >
                <i class="fa fa-th-large">
                </i>
                <span class="tip">
                                Grid view
                            </span>
            </a>
        </li>
        <li class="<? if($_REQUEST['sort'] == 'list'){ echo 'active';}?> ">
            <a class="group-btn tip-trigger"  href="asset_list.php?<? echo $url_parameter.'&sort=list';?>" >
                <i class="fa fa-list">
                </i>
                <span class="tip">
                                List view
                            </span>
            </a>
        </li>
    </ul>
    </div>




    </div>





